/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pruebaes.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author luisfernando
 */
@Entity
@Table(name = "ciiunivel7")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Ciiunivel7.findAll", query = "SELECT c FROM Ciiunivel7 c"),
    @NamedQuery(name = "Ciiunivel7.findById", query = "SELECT c FROM Ciiunivel7 c WHERE c.id = :id"),
    @NamedQuery(name = "Ciiunivel7.findByActividadeconomica", query = "SELECT c FROM Ciiunivel7 c WHERE c.actividadeconomica = :actividadeconomica"),
    @NamedQuery(name = "Ciiunivel7.findByCodigo", query = "SELECT c FROM Ciiunivel7 c WHERE c.codigo = :codigo"),
    @NamedQuery(name = "Ciiunivel7.findByGrupoluae", query = "SELECT c FROM Ciiunivel7 c WHERE c.grupoluae = :grupoluae")})
public class Ciiunivel7 implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Size(max = 2147483647)
    @Column(name = "actividadeconomica")
    private String actividadeconomica;
    @Size(max = 2147483647)
    @Column(name = "codigo")
    private String codigo;
    @Size(max = 2147483647)
    @Column(name = "grupoluae")
    private String grupoluae;
    @JoinColumn(name = "formulario", referencedColumnName = "id")
    @ManyToOne
    private Formularios formulario;
    @OneToMany(mappedBy = "ciu7")
    private List<Locales> localesList;

    public Ciiunivel7() {
    }

    public Ciiunivel7(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getActividadeconomica() {
        return actividadeconomica;
    }

    public void setActividadeconomica(String actividadeconomica) {
        this.actividadeconomica = actividadeconomica;
    }

    public String getCodigo() {
        return codigo;
    }

    public void setCodigo(String codigo) {
        this.codigo = codigo;
    }

    public String getGrupoluae() {
        return grupoluae;
    }

    public void setGrupoluae(String grupoluae) {
        this.grupoluae = grupoluae;
    }

    public Formularios getFormulario() {
        return formulario;
    }

    public void setFormulario(Formularios formulario) {
        this.formulario = formulario;
    }

    @XmlTransient
    public List<Locales> getLocalesList() {
        return localesList;
    }

    public void setLocalesList(List<Locales> localesList) {
        this.localesList = localesList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Ciiunivel7)) {
            return false;
        }
        Ciiunivel7 other = (Ciiunivel7) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.pruebaes.entidades.Ciiunivel7[ id=" + id + " ]";
    }
    
}
